package cn.com.dhcc.ddi.task.vo;

import java.util.Date;

import cn.com.dhcc.app.core.annotation.SiColumn;
import cn.com.dhcc.app.core.annotation.SiNotDbColumn;
import cn.com.dhcc.app.core.annotation.SiTable;
import cn.com.dhcc.app.core.base.ModuleFeatureBean;

/**
 * 
 * @类: TaskExecuteLog
 * @描述: 数据交换日志表
 * @作者: 张洪涛
 * @日期: 2016年11月14日 下午3:40:33
 * @版权所有: 东华软件
 * @版本:1.0
 */
@SiTable(name = "t_ddi_task_log")
public class TaskExecuteLog extends ModuleFeatureBean {
	@SiColumn(isId = true)
	private String id;
	@SiColumn(name = "task_id")
	private String taskId;// 所属任务
	private String linkType;//环节类型：1 抽取 2 映射 3 加载
	@SiColumn(name = "link_data_file_path")
	private String linkDataFilePath;//环节数据文件路径
	@SiColumn(name = "log_status")
	private String logStatus;// 执行结果0失败1成功
	@SiColumn(name = "log_msg")
	private String logMsg;// 日志成功失败信息
    private long total;//数据总数
	private String linkSummary;// 环节执行结果摘要信息
	private Date linkStartTime;//环节执行开始时间
	private Date linkEndTime;// 环节执行结束时间
	private Date mtime;// 最后修改时间
    @SiColumn(name = "group_id")
	private String groupId;//日志组id,存储大任务的id,标识出每一环节日志的所属大任务日志
	private long insertNum;//insert语句多少条
	private long updateNum;//update语句多少条
	private long errorNum;//执行失败多少条

	/**
	 * @return id
	 */
	public String getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	
	public void setId(String id) {
		this.id = id;
	}
	/**
	 * @return taskId
	 */
	public String getTaskId() {
		return taskId;
	}
	/**
	 * @param taskId the taskId to set
	 */
	
	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}
	/**
	 * @return linkType
	 */
	public String getLinkType() {
		return linkType;
	}
	/**
	 * @param linkType the linkType to set
	 */
	
	public void setLinkType(String linkType) {
		this.linkType = linkType;
	}
	/**
	 * @return linkDataFilePath
	 */
	public String getLinkDataFilePath() {
		return linkDataFilePath;
	}
	/**
	 * @param linkDataFilePath the linkDataFilePath to set
	 */
	
	public void setLinkDataFilePath(String linkDataFilePath) {
		this.linkDataFilePath = linkDataFilePath;
	}
	/**
	 * @return logStatus
	 */
	public String getLogStatus() {
		return logStatus;
	}
	/**
	 * @param logStatus the logStatus to set
	 */
	
	public void setLogStatus(String logStatus) {
		this.logStatus = logStatus;
	}
	/**
	 * @return logMsg
	 */
	public String getLogMsg() {
		return logMsg;
	}
	/**
	 * @param logMsg the logMsg to set
	 */
	
	public void setLogMsg(String logMsg) {
		this.logMsg = logMsg;
	}
	/**
	 * @return linkSummary
	 */
	public String getLinkSummary() {
		return linkSummary;
	}
	/**
	 * @param linkSummary the linkSummary to set
	 */
	
	public void setLinkSummary(String linkSummary) {
		this.linkSummary = linkSummary;
	}
	/**
	 * @return linkStartTime
	 */
	public Date getLinkStartTime() {
		return linkStartTime;
	}
	/**
	 * @param linkStartTime the linkStartTime to set
	 */
	
	public void setLinkStartTime(Date linkStartTime) {
		this.linkStartTime = linkStartTime;
	}
	/**
	 * @return linkEndTime
	 */
	public Date getLinkEndTime() {
		return linkEndTime;
	}
	/**
	 * @param linkEndTime the linkEndTime to set
	 */
	
	public void setLinkEndTime(Date linkEndTime) {
		this.linkEndTime = linkEndTime;
	}
	/**
	 * @return mtime
	 */
	public Date getMtime() {
		return mtime;
	}
	/**
	 * @param mtime the mtime to set
	 */
	
	public void setMtime(Date mtime) {
		this.mtime = mtime;
	}

	/**
	 * @return total
	 */
	public long getTotal() {
		return total;
	}
	/**
	 * @param total the total to set
	 */
	
	public void setTotal(long total) {
		this.total = total;
	}

	public long getInsertNum() {
		return insertNum;
	}

	public void setInsertNum(long insertNum) {
		this.insertNum = insertNum;
	}

	public long getUpdateNum() {
		return updateNum;
	}

	public void setUpdateNum(long updateNum) {
		this.updateNum = updateNum;
	}

	public long getErrorNum() {
		return errorNum;
	}

	public void setErrorNum(long errorNum) {
		this.errorNum = errorNum;
	}

	public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }
	public enum LINK_TYPE{
		EXTRACT("1","抽取","extract"),
		TRANSFORM("2","映射","transform"),
		LOAD("3","加载","load");

		private String code;
		private String name;
		private String ename;

		public String getCode() {
			return code;
		}

		public String getName() {
			return name;
		}

		public String getEname() {
			return ename;
		}

        LINK_TYPE(String code, String name, String ename) {
            this.code = code;
            this.name = name;
            this.ename = ename;
        }
    }

}
